/**
 * Dev mode config
 * 开发模式配置
 */
// 网页打包
var webpack = require('webpack');
// 路径
var path = require('path');
// 模块 输出
module.exports = {
  // 实体
  entry: [
    'webpack-dev-server/client?http://localhost:8080',
    'webpack/hot/dev-server',
    './scripts/index'
  ],
  // 输出
  output: {
    // 路径
    path: __dirname,
    // 文件名
    filename: 'bundle.js',
    // 公共路径
    publicPath: '/dist/'
  },
  // 解析
  resolve: {
    // 扩展
    extensions: ['', '.js']
  },
  // 
  devtool: 'eval-source-map',
  // 
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new webpack.NoErrorsPlugin()
  ],
  // 
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        loaders: ['babel'],
        include: path.join(__dirname, 'scripts')
      },
      {
        test: /\.less?$/,
        loader: 'style!css!less'
      },
      {
        test: /\.vue$/,
        loader: 'vue'
      }
    ]
  },
  vue: {
    loaders: {
      js: 'babel'
      // js: 'babel!eslint'
    }
  },
}